package edu.gatech.cs2340.sharks.fms.data;

/**
 * Info.java
 * @author Matthew Schauer
 * 
 * Contains information that is needed throughout the program
 */

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import edu.gatech.cs2340.sharks.fms.R;

public abstract class Info
{
	/**
	 * Identifier strings for intent resources
	 */
	public final static String USERNAME = "edu.gatech.cs2340.sharks.fms.USERNAME";
	public final static String SESSION = "edu.gatech.cs2340.sharks.fms.SESSION";
	public final static String ITEM_ID = "edu.gatech.cs2340.sharks.fms.ITEM_ID";
	
	public static void alert(final Activity activity, String message)
	{
		AlertDialog.Builder builder = new AlertDialog.Builder(activity);
		builder.setMessage(message).setTitle(R.string.error_dialog_title);
		builder.setNegativeButton(R.string.error_dialog_cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { activity.finish(); } });
		AlertDialog dialog = builder.create();
		dialog.show();
	}
}
